import { defineStore } from 'pinia';


export const useUserStore = defineStore('user', {
    state: () => {
        return {
            userInfo: null,
            token: null
        };
    },
    actions: {
        handleSetUser(val) {
            this.userInfo = val;
        },
        handleSetToken(val) {
            this.token = val;
        },
        handleReset() {
            this.userInfo = null;
            this.token = null;
        }

    }
});
